home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 2 / MacMania 2.toast / Demo's / Tools&Utilities / Programming / Tools Plus 2.5 / Compiling the Demos < prev    next >
Encoding:
Text File  |  1994-05-23  |  3.3 KB  |  71 lines  |  [TEXT/ttxt]

  1. This document tells you how to compile the demo application that is included with this package.
  2.  
  3.  
  4.  
  5.  
  6. Compiling The C Demo Application
  7. ````````````````````````````````
  8. The easiest way to compile the C demo application included with Tools Plus is to have the following files in the same folder:
  9.     Demo.π
  10.     Demo.π.rsrc
  11.     Demo.c
  12.     ToolsPlus.Lib1
  13.     ToolsPlus.Lib2
  14.     ToolsPlus.Lib3
  15.     ToolsPlus.h
  16.     ToolsPlus.c
  17.     PascalStrHandles.c
  18. Double-click the Demo.π project file to launch THINK C, then run your project.
  19.  
  20.   Your project file keeps track of each file’s location as you add it to your project, so you may want to create a new project file after you have put all the Tools Plus libraries and their related files in their permanent folders.  Create a new (empty) project named “Demo.π” in the same folder as “Demo.π.rsrc” and “PascalStrHandles.c”.  Add the following files to your new project:
  21.     Segment 1:   MacTraps
  22.                  MacTraps2
  23.     Segment 2:   ANSI
  24.     Segment 3:   ToolsPlus.Lib1
  25.     Segment 4:   ToolsPlus.Lib2
  26.     Segment 5:   ToolsPlus.Lib3
  27.                  ToolsPlus.c
  28.     Segment 6:   Demo.c
  29. You can now build your project and run your application.
  30.  
  31.  
  32.  
  33.  
  34.  
  35. Compiling The Pascal Demo Application
  36. `````````````````````````````````````
  37. The easiest way to compile the Pascal demo application included with Tools Plus is to have the following files in the same folder:
  38.     Demo.π
  39.     Demo.π.rsrc
  40.     Demo.p
  41.     ToolsPlus.Lib1
  42.     ToolsPlus.Lib2
  43.     ToolsPlus.Lib3
  44.     ToolsPlus.p
  45. Double-click the Demo.π project file to launch THINK Pascal, then run your project.
  46.  
  47.   Your project file keeps track of each file’s location as you add it to your project, so you may want to create a new project file after you have put all the Tools Plus libraries and their related files in their permanent folders.  Create a new project named “Demo.π” in the same folder as “Demo.π.rsrc”.  Add the following files to your new project:
  48.     Segment 1:   Runtime.Lib
  49.                  Interface.Lib
  50.     Segment 2:   ToolsPlus.Lib1
  51.     Segment 3:   ToolsPlus.Lib2
  52.     Segment 4:   ToolsPlus.Lib3
  53.                  ToolsPlus.p
  54.     Segment 5:   Sound.p
  55.                  Demo.p
  56. You can now build your project.  After the initial compile, you will notice THINK Pascal created some additional entries in your project file:
  57.     «ToolsPlus.Lib1:1»
  58.     «ToolsPlus.Lib2:1»
  59.     «ToolsPlus.Lib3:1»
  60.     «%_MethTables»
  61.     «%_SelProcs»
  62.     «%_Profiler»
  63.  
  64.   The «ToolsPlus.Lib1:1», «ToolsPlus.Lib2:1» and «ToolsPlus.Lib3:1» items contain the object code from the Tools Plus libraries, while «%_MethTables», «%_SelProcs» and «%_Profiler» items are part of THINK Pascal’s overhead (consult your THINK Pascal User Manual for details).
  65.  
  66.   Drag «ToolsPlus.Lib1:1» into the same segment as ToolsPlus.Lib1, «ToolsPlus.Lib2:1» into the same segment as ToolsPlus.Lib2, and «ToolsPlus.Lib3:1» into the same segment as ToolsPlus.Lib3.
  67.  
  68.   Drag «%_MethTables», «%_SelProcs» and «%_Profiler» to any segment that won’t be unloaded while your application is running, such as the one containing the Runtime.lib library.
  69.  
  70.   Even though the project window indicates that Segment 1 exceeds the 32k limit imposed on segments, the project will compile and run.  When you build your application, the smart linker will strip away unneeded code and significantly reduce the size of this segment.
  71.